package com.xuexiang.xuidemo.slice.imageview.preview;

import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;
import ohos.multimodalinput.event.KeyEvent;

import com.xuexiang.xuidemo.slice.imageview.preview.slice.VideoSlice;

public class VideoSliceAbility extends Ability {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setMainRoute(VideoSlice.class.getName());
    }
    @Override
    public boolean onKeyUp(int keyCode, KeyEvent keyEvent) {
        if (keyCode == KeyEvent.KEY_BACK) {
            terminateAbility();
        }
        return super.onKeyUp(keyCode, keyEvent);
    }
}
